﻿using GalaSoft.MvvmLight;
using JiveMessenger.User;
using System;
using System.ComponentModel;
using System.Windows.Controls;


namespace JiveMessenger.Views
{
    /// <summary>
    /// Interaction logic for LayoutPage.xaml
    /// </summary>
    public partial class LayoutPage : Page,INotifyPropertyChanged
    {
        private PrivateMessageBehavior _privateMessageBehavior;
        public PrivateMessageBehavior PrivateMessageBehavior
        {
            get { return _privateMessageBehavior; }
            set
            {
                if (_privateMessageBehavior != value)
                {
                    _privateMessageBehavior = value;
                    RaisePropertyChanged("PrivateMessageBehavior");
                }
            }
        }

        public LayoutPage()
        {
            InitializeComponent();
            PrivateMessageBehavior = (PrivateMessageBehavior)Enum.Parse(typeof(PrivateMessageBehavior),Properties.Settings.Default.SettingPrivateMessageLocation);
        }
        protected virtual void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
        }
        public event PropertyChangedEventHandler PropertyChanged;
    }

}
